<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<title>后台管理</title>

		<meta name="keywords" content="">
		<meta name="description" content="">

		<!--[if lt IE 9]>
	    <meta http-equiv="refresh" content="0;ie.html" />
	    <![endif]-->

		<link rel="shortcut icon" href="favicon.ico">
		<link href="/Public/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
		<link href="/Public/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
		<link href="/Public/Admin/css/animate.min.css" rel="stylesheet">
		<link href="/Public/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	</head>
	<style type="text/css">
		.navbar{margin-bottom:0;}

	</style>
	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
		
		<div id="wrapper">
			<!--左侧导航开始-->
			<nav class="navbar-default navbar-static-side" role="navigation">
				<div class="nav-close"><i class="fa fa-times-circle"></i>
				</div>
				<div class="sidebar-collapse">
					<ul class="nav" id="side-menu">
						<li class="nav-header">
							<div class="dropdown profile-element">
								<!-- <span><img alt="image" class="img-circle" src="/Public/Admin/img/profile_small.jpg" /></span> -->
								<a data-toggle="dropdown" class="dropdown-toggle" href="#">
									<span class="clear">
										<strong size="14" class="text-muted text-xs font-bold"><?php echo C('sitename');?>管理系统 v7.7</strong>
                               			<span class="block m-t-xs"><strong class="font-bold"><?php echo ($_SESSION['admin']['username']); ?></strong></span>
									<span class="text-muted text-xs block">超级GM管理员<b class="caret"></b></span>
									</span>
								</a>
								<ul class="dropdown-menu animated fadeInRight m-t-xs">
									<li>
										<a class="J_menuItem" href="<?php echo U('Index/pwd');?>">修改密码</a>
									</li>
									<li>
										<a href="<?php echo U('Index/del');?>">清理缓存</a>
									</li>
									<li class="divider"></li>
									<li>
										<a href="<?php echo U('Login/logout');?>">安全退出</a>
									</li>
								</ul>
							</div>
							<div class="logo-element">M</div>
						
						</li>
						<li>
							<a href="<?php echo U('Index/index');?>">
								<i class="fa fa-home"></i>
								<span class="nav-label">主页</span>
							</a>
						</li>
					
						<li>
							<a class="J_menuItem" href="<?php echo U('Site/index');?>">
								<i class="fa fa-columns "></i>
								<span class="nav-label">网站设置</span>
							</a>
						</li>
						<!--公告
												<li>
							<a href="#">
								<i class="fa fa-level-up"></i>
								<span class="nav-label">公告管理</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Integral/gonggao');?>">发布公告(推送)</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/systemTipList');?>">系统公告列表</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/systemTipAdd');?>">系统发布公告</a>
								</li>	
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/activeAdd');?>">活动公告</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/activeList');?>">活动列表</a>
								</li>							
							</ul>
						</li>
						-->
						<li>
							<a href="#">
								<i class="fa fa-flask"></i>
								<span class="nav-label">系统配置</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<!--<li>-->
									<!--<a class="J_menuItem" href="<?php echo U('Site/dayCard');?>">签到配置</a>-->
								<!--</li>-->
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/pk10');?>">基本配置</a>
								</li>
							</ul>
						</li>

						<li>
							<a href="#">
								<i class="fa fa-flask"></i>
								<span class="nav-label">视讯类配置</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/hundred');?>">百家乐下注配置</a>
								</li>								
							</ul>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/hundredList');?>">百家乐期数列表</a>
								</li>								
							</ul>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/longhu');?>">龙虎斗下注配置</a>
								</li>
							</ul>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Site/hundredList_lh');?>">龙虎斗期数列表</a>
								</li>
							</ul>
						</li>
						<li>
							<a class="J_menuItem" href="<?php echo U('Member/index');?>">
								<i class="fa fa-user "></i>
								<span class="nav-label">会员管理</span>
							</a>
						</li>
						<li>
							<a class="J_menuItem" href="<?php echo U('Order/index');?>">
								<i class="fa fa-taxi "></i>
								<span class="nav-label">竞猜记录</span>
							</a>
						</li>
						<li>
							<a href="#">
								<i class="fa fa-level-up"></i>
								<span class="nav-label">上下分管理</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Fen/addlist');?>">上分申请</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Fen/xialist');?>">下分申请</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Integral/lists');?>">上下分记录</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Fen/setwx');?>">微信收款设置</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Fen/setzfb');?>">支付宝收款设置</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Robot/kefu');?>">微信客服二维码</a>
								</li>
							</ul>
						</li>

						<li>
							<a href="#">
								<i class="fa fa-paper-plane"></i>
								<span class="nav-label">代理管理</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Member/push');?>">代理列表</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Member/infoList');?>">代理报表</a>
								</li>
								<!--<li>-->
									<!--<a class="J_menuItem" href="<?php echo U('Site/agent');?>">代理设置</a>-->
								<!--</li>-->
								<!--<li>-->
									<!--<a class="J_menuItem" href="<?php echo U('Member/agent_fh');?>">代理分红</a>-->
								<!--</li>-->
								
							</ul>
						</li>

					
						<!--<li>-->
							<!--<a class="J_menuItem" href="<?php echo U('Member/fs');?>">-->
								<!--<i class="fa fa-paper-plane "></i>-->
								<!--<span class="nav-label">会员返水</span>-->
							<!--</a>-->
						<!--</li>-->

						<li>
							<a href="#">
								<i class="fa fa-random "></i>
								<span class="nav-label">数据采集</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">

								<li>
									<a class="J_menuItem" href="<?php echo U('Caiji/taimian');?>">百家乐台面端</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Caiji/taimian_lh');?>">龙虎斗台面端</a>
								</li>
							</ul>
						</li>
						<li>
							<a href="#">
								<i class="fa fa fa-bar-chart-o"></i>
								<span class="nav-label">输赢统计</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<!--<li>-->
									<!--<a class="J_menuItem" href="<?php echo U('Order/win_lose');?>">平台输赢</a>-->
								<!--</li>-->
								<li>
									<a class="J_menuItem" href="<?php echo U('Order/user_win_lose');?>">客户输赢</a>
								</li>
							</ul>
						</li>
						<li>
							<a href="#">
								<i class="fa fa-male"></i>
								<span class="nav-label">机器人管理</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Robot/index');?>">机器人管理</a>
								</li>
								<!--<li>-->
									<!--<a class="J_menuItem" href="<?php echo U('Robot/message');?>">机器人竞猜</a>-->
								<!--</li>-->
							</ul>
						</li>

						<li>
							<a href="#">
								<i class="fa fa-male"></i>
								<span class="nav-label">管理员管理</span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<li>
									<a class="J_menuItem" href="<?php echo U('Admin/index');?>">管理员列表</a>
								</li>
								<li>
									<a class="J_menuItem" href="<?php echo U('Admin/log');?>">管理员日志</a>
								</li>
								
							</ul>
						</li>
												
					</ul>
				</div>
			</nav>
			<!--左侧导航结束-->

			<!--右侧部分开始-->
			<div id="page-wrapper" class="gray-bg dashbard-1">
				<div class="row border-bottom">
					<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0；overflow:hidden;">
						<div class="navbar-header" style="width: 10%;">
							<a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
						</div>
					
						<div class="notice" style="display:inline-block;float: right;height: 50px;line-height: 50px">
							<a href="/Admin/Fen/addlist"  class="J_menuItem btn shang">上分请求:<font color="red"><?php echo ($sf_count); ?></font> <span></span>个</a>
							<a href="/Admin/Fen/xialist" class="J_menuItem btn xia">下分请求 <font color="red"><?php echo ($xf_count); ?></font><span></span>个</a>
						</div>
					
					</nav>

				</div>
				<div class="J_menuTabs"></div>
				<div class="row J_mainContent" id="content-main" style="overflow-y: auto; -webkit-overflow-scrolling: touch; overflow-y: scroll;">
					<iframe id="iframe_default" src="<?php echo U('Index/show');?>" class="J_iframe" name="iframe0" width="100%" height="100%" frameborder="0" data-id="default" seamless></iframe>
				</div>
			<!-- 	<div class="footer">
					<div class="pull-right">Copyright@ 2017 OOP
					</div>
				</div> -->
			</div>
			<!--右侧部分结束-->
			
		</div>

		<script src="/Public/Admin/js/jquery.min.js?v=2.1.4"></script>
		<script src="/Public/Admin/js/bootstrap.min.js?v=3.3.6"></script>
		<script src="/Public/Admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="/Public/Admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<script src="/Public/Admin/js/plugins/layer/layer.min.js"></script>
		<script src="/Public/Admin/js/hplus.min.js?v=4.1.0"></script>
		<script type="text/javascript" src="/Public/Admin/js/contabs.min.js"></script>
		<script src="/Public/Admin/js/plugins/pace/pace.min.js"></script>

		<!--推送-->
		<script src='//cdn.bootcss.com/socket.io/1.3.7/socket.io.js'></script>
		<!-- <script>
			var uid = '<?php echo ($userinfo["id"]); ?>';
		</script> -->
		<script>
			function escape2Html(str) {
			 	var arrEntities={'lt':'<','gt':'>','nbsp':' ','amp':'&','quot':'"'};
			 	return str.replace(/&(lt|gt|nbsp|amp|quot);/ig,function(all,t){return arrEntities[t];});
			}
			$(document).ready(function() {
				// 连接服务端
				var socket = io('http://' + document.domain + ':12223');
				// 连接后登录
				// socket.on('connect', function() {
				// 	socket.emit('login', uid);
				// });
				// 后端推送来消息时
				socket.on('new_msg', function(msg) {
					var data = eval("(" + escape2Html(msg) + ")");
                    if(data["has_points"]){
						window.has_points=data["has_points"];
                    }
					var time = data['time'];
					var type = data['type'];
					var t_id = data['t_id'];
					var content = data['content'];
					console.log(data);
					if (type == 1 /*&& t_id == 0*/) {
						$('.notice .shang').find('span').html('<audio src="/Public/Admin/images/sf.mp3" controls="controls" style="display:none" autoplay="autoplay"></audio>');
						$dom_font = $('.notice .shang').find('font');
						$num = parseInt($dom_font.text()) + 1;
						$dom_font.text($num);
					} else if(type ==2 /*&& t_id == 0*/) {
						$('.notice .xia').find('span').html('<audio src="/Public/Admin/images/xf.mp3" controls="controls" style="display:none" autoplay="autoplay"></audio>');
						$dom_font = $('.notice .xia').find('font');
						$num = parseInt($dom_font.text()) + 1;
						$dom_font.text($num);
					} else if(type ==3) {
						$dom_font = $('.notice .shang').find('font');
						$num = parseInt($dom_font.text()) - 1;
						$dom_font.text($num);
					} else if(type == 4) {
						$dom_font = $('.notice .xia').find('font');
						$num = parseInt($dom_font.text()) - 1;
						$dom_font.text($num);
					}

					// $(".chatting").prepend('<div class="chatting-li qtr pink"><div class="portrait"><img src="/Public/main/img/system.jpg"/></div><div class="content"><small><span class="name">客服</span><time>'+time+'</time></small><p>' + content + '</p></div></div>');
				});
			});

			if (<?php echo C('is_repeat_voice');?>) {
				setInterval(function(){
					var shang_font = $('.notice .shang').find('font').text();
					var xia_font = $('.notice .xia').find('font').text();
					if (parseInt(shang_font) > 0) {
						$('.notice .shang').find('span').html('<audio src="/Public/Admin/images/sf.mp3" controls="controls" style="display:none" autoplay="autoplay"></audio>');
					}

					if (parseInt(xia_font) > 0) {
						$('.notice .xia').find('span').html('<audio src="/Public/Admin/images/xf.mp3" controls="controls" style="display:none" autoplay="autoplay"></audio>');
					}
				},5000);
			}

		</script>
		<!--推送-->
	</body>

</html>